package com.ticket.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ticket.entity.TicketOrder;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface TicketOrderMapper extends BaseMapper<TicketOrder> {
    
    @Select("SELECT ticket_number FROM ticket_orders WHERE match_id = #{matchId} AND section_id = #{sectionId} AND status != 'CANCELLED' AND status != 'REFUNDED'")
    List<Integer> getOccupiedSeatNumbers(Long matchId, Long sectionId);
} 